<html><head><title>CompressMemory</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">CompressMemory()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>CompressMemory</b></font>(*Buffer, Size, *Output, OutputSize [, PluginID])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Compress the buffer content into the output buffer. The output buffer length needs to be 
at least as long as the buffer to compress. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>*Buffer</i></td>
<td width="90%"> 
The memory buffer to compress. 

</td></tr>
<tr><td><i>Size</i></td>
<td> 
The size of the memory to compress. 

</td></tr>
<tr><td><i>*Output</i></td>
<td> 
The memory buffer to store the compressed data. 

</td></tr>
<tr><td><i>OutputSize</i></td>
<td> 
The memory buffer size to store the compressed data. 

</td></tr>
<tr><td><i>PluginID (optional)</i></td>
<td> 
The plugin to use, if more than one packer plugin has been registered. It can be one of the following value: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_PackerPlugin_BriefLZ</font>: use the BriefLZ packer to compress the memory. <a href="usebrieflzpacker.html">UseBriefLZPacker()</a> has to be called to have any effect.
  <font color="#924B72">#PB_PackerPlugin_Zip</font>    : use the Zip packer to compress the memory. <a href="usezippacker.html">UseZipPacker()</a> has to be called to have any effect.
  <font color="#924B72">#PB_PackerPlugin_LZMA</font>   : use the LZMA packer to compress the memory. <a href="uselzmapacker.html">UseLZMAPacker()</a> has to be called to have any effect.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Return the compressed size if the buffer has been successfully compressed, zero otherwise. 
If the buffer data can't be compressed (already compressed data generally don't compress anymore), it will return zero. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="uncompressmemory.html">UncompressMemory()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=closepack.html>ClosePack()</a> - <a href=index.html>Packer Index</a> - <a href=createpack.html>CreatePack()</a> ->

</body></html>